package com.dgshanger.sanhxiaofeisc.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dgshanger.sanhxiaofeisc.R
import com.dgshanger.sanhxiaofeisc.common.Constants
import com.dgshanger.sanhxiaofeisc.entity.ShoppingVideoEntity
import com.dgshanger.sanhxiaofeisc.ui.home.utils.ImageLoader

/**
 * Created by JacobHHH on 2018/4/18.
 */
class ShoppingVideoAdapter(layoutResId : Int, data : List<ShoppingVideoEntity>) : BaseQuickAdapter<ShoppingVideoEntity, BaseViewHolder>(layoutResId,data) {



    override fun convert(helper: BaseViewHolder?, item: ShoppingVideoEntity?) {
        ImageLoader.loadToUrl(mContext,helper!!.getView(R.id.iv_video),Constants.getBaseUrl()+item!!.video_thumb)
        helper.setText(R.id.tv_video_title,item.video_title)
        helper.setText(R.id.tv_video_grade,item.video_introduce)
    }


}